#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.web.health;


import ${package}.core.annotation.Limit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * FooController
 *
 * @author Felordcn
 * @since 9 :36 2019/10/12
 */
@RestController
@RequestMapping("/foo")
public class FooController {

    private static final Logger logger = LoggerFactory.getLogger(FooController.class);


    /**
     * Pre filter collection.
     *
     * @param ids the ids
     * @return the collection
     */
    @PostMapping("/prefilter")
    public Collection<String> preFilter(@RequestBody Collection<String> ids) {
        return ids;
    }


    /**
     * Postfilter collection.
     *
     * @return the collection
     */
    @GetMapping("/postfilter")
    @Limit(permitsPerSecond = 0.0, timeout = 0L)
    public Collection<String> postfilter() {
        List<String> list = new ArrayList<>();
        list.add("Felordcn");
        list.add("felord");
        list.add("jetty");
        return list;
    }


    /**
     * @return the string
     */
    @GetMapping("/secure")
    public String secure() {
        return "success";
    }
}
